﻿@model ArbabTravelsERP.Models.RequirementModel
@{
    ViewBag.Title = "CreateReq";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using (Html.BeginForm("CreateReq", "Requirement", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @id = "formControl", @class = "form-horizontal", enctype = "multipart/form-data" }))
{

    @Html.AntiForgeryToken()

    <div class="right_col" role="main">
        <div class="">
            <div class="page-title">
                <div class="title_left">
                    <h3>Requirements</h3>
                </div>
            </div>
            <div class="clearfix"></div>
            <div class="row">
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="x_panel">
                        <div class="x_title">
                            <h2>Add Requirement Details</h2>
                            <div class="clearfix"></div>
                        </div>
                        <div class="x_content">
                            @if (@TempData["Success"] != null)
                            {
                                <div class="alert alert-success alert-dismissable">
                                    <button type="button" class="close" data-dismiss="alert"
                                            aria-hidden="true">
                                        &times;
                                    </button>
                                    @TempData["Success"]
                                </div>
                            }
                            <!-- Tabs -->
                            <br />
                            <div id="requirementForm" data-parsley-validate class="form-horizontal form-label-left">
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3" for="requirementNo">Requirement No <span class="required">*</span> </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.TextBoxFor(model => model.REQUIREMENT_NO, new { @id = "REQUIREMENT_NO", @class = "form-control  col-md-7 col-xs-12", @autocomplete = "off", @maxlength = "20", @readonly = "readonly" })
                                        @Html.ValidationMessageFor(model => model.REQUIREMENT_NO)
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3" for="contactPerson">Date Received <span class="required">*</span> </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.TextBoxFor(model => model.DATE_RECEIVED, new { @id = "DATE_RECEIVED", @class = "form-control  col-md-7 col-xs-12", @autocomplete = "off", @maxlength = "20", @readonly = "readonly" })
                                        @Html.ValidationMessageFor(model => model.DATE_RECEIVED)
                                        @*<input type="text" class="date-picker form-control" data-inputmask="'mask': '99/99/9999'" id="date-received" name="dateReceived">
                                            <span id="textBoxName"></span>*@
                                    </div>
                                </div>
                                <script type="text/javascript">
                                    //                        $(document).ready(function () {
                                    //                            $('#date-received').daterangepicker({
                                    //                                singleDatePicker: true,
                                    //                                calender_style: "picker_4"
                                    //                            }, function (start, end, label) {
                                    //                                console.log(start.toISOString(), end.toISOString(), label);
                                    //                            });
                                    //                        });
                                    //                    </script>
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3">Company Name <span class="required">*</span> </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.DropDownListFor(model => model.COMPANY_NAME, ViewData["GetCompany"] as SelectList, "Select Company", new { @id = "USER_COMPANY_NAME", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label col-md-3 col-sm-3">Contact Person <span class="required">*</span> </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.TextBoxFor(model => model.CONTACT_RECEIVED, new { @id = "CONTACT_RECEIVED", @class = "form-control  col-md-7 col-xs-12", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>

                                <div class="form-group groupAddress">
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3">Status <span class="required">*</span> </label>
                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                        @{
                            List<SelectListItem> listStatus = new List<SelectListItem>();
                            listStatus.Add(new SelectListItem
                            {
                                Text = "Active",
                                Value = "Active"
                            });
                            listStatus.Add(new SelectListItem
                            {
                                Text = "InActive",
                                Value = "InActive"
                            });
                                        }
                                        @Html.DropDownListFor(model => model.STATUS, listStatus, "--Select Status--", new { @id = "STATUS", @class = "form-control", @autocomplete = "off" })


                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="middle-name" class="control-label col-md-3 col-sm-3">Number of Openings <span class="required">*</span></label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.TextBoxFor(model => model.NO_OF_OPENING, new { @id = "NO_OF_OPENING", @class = "form-control  col-md-7 col-xs-12", @autocomplete = "off", @maxlength = "3" })
                                        @*<input type="number" min="0" id="numberOfOpenings" name="numberOfOpenings" class="form-control col-md-7 col-xs-12">*@
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="middle-name" class="control-label col-md-3 col-sm-3">Industry </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.DropDownListFor(model => model.INDUSTRY, ViewData["GetIndustry"] as SelectList, "Select Industry", new { @id = "INDUSTRY", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="middle-name" class="control-label col-md-3 col-sm-3">Education </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.DropDownListFor(model => model.EDUCATION, ViewData["GetEducation"] as SelectList, "Select Education", new { @id = "EDUCATION", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="middle-name" class="control-label col-md-3 col-sm-3">Specialization </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.DropDownListFor(model => model.SPECIALIZATION, ViewData["GetSpecialization"] as SelectList, "Select Specialization", new { @id = "SPECIALIZATION", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Certification</label>
                                    <div class="col-xs-5">
                                        @Html.TextBoxFor(model => model.CERTIFICATION, new { @id = "CERTIFICATION", @class = "form-control  col-md-7 col-xs-12", @autocomplete = "off" })
                                        @*<input type="text" class="form-control" name="certification[]" />*@
                                    </div>
                                    <div class="col-xs-4">
                                        <button type="button" class="addButton"><i class="fa fa-plus" id="SaveCertification"></i></button>
                                    </div>
                                    <table class="table  table-bordered table-responsive table-striped" id="tblCertification"></table>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Experience</label>
                                    <div class="col-md-3 col-sm-3">
                                        @Html.TextBoxFor(model => model.EXPERIENCE_FROM, new { @id = "EXPERIENCE_FROM", @class = "form-control", @placeholder = "From", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                    <div class="col-md-3 col-sm-3">
                                        @Html.TextBoxFor(model => model.EXPERIENCE_TO, new { @id = "EXPERIENCE_TO", @class = "form-control", @placeholder = "To", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>
                                <div class="form-group groupAddress">
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Gender <span class="required">*</span>  </label>
                                    <div class="col-md-6 col-sm-6">
                                        @{
                            List<SelectListItem> listGender = new List<SelectListItem>();
                            listGender.Add(new SelectListItem
                            {
                                Text = "Male",
                                Value = "Male"
                            });
                            listGender.Add(new SelectListItem
                            {
                                Text = "Female",
                                Value = "Female"
                            });
                                        }
                                        @Html.DropDownListFor(model => model.GENDER, listGender, "--Select Gender--", new { @id = "GENDER", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Age</label>
                                    <div class="col-md-3 col-sm-3">
                                        @Html.TextBoxFor(model => model.AGE_FROM, new { @id = "AGE_FROM", @class = "form-control", @placeholder = "From", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                    <div class="col-md-3 col-sm-3">
                                        @Html.TextBoxFor(model => model.AGE_TO, new { @id = "AGE_TO", @class = "form-control", @placeholder = "To", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Religion<span class="required">*</span></label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.DropDownListFor(model => model.RELIGION, ViewData["GetReligion"] as SelectList, "Select Religion", new { @id = "RELIGION", @class = "form-control", @autocomplete = "off" })
                                        @Html.ValidationMessageFor(model => model.RELIGION, "", new { @class = "text-danger" })
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="middle-name" class="col-xs-3 control-label">Languages</label>
                                    <div class="col-md-5 col-sm-5">
                                        @Html.DropDownListFor(model => model.LANGUAGE, ViewData["GetLanguage"] as SelectList, "Select Language", new { @id = "LANGUAGE", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                    <div class="col-xs-1">
                                        <button type="button" class="addAddress addButton" id="SaveLanguage"><i class="fa fa-plus"></i></button>
                                    </div>
                                </div>

                                <div class="form-group groupAddress"></div>

                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Mode Of Interview </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.DropDownListFor(model => model.MODE_OF_INTERVIEW, ViewData["GetModeOfInterview"] as SelectList, "Select Mode of Interview", new { @id = "MODE_OF_INTERVIEW", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="middle-name" class="col-xs-3 control-label">Posting Place</label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.TextBoxFor(model => model.POSTING_PLACE, new { @id = "POSTING_PLACE", @class = "form-control", @placeholder = "Posting Place", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="middle-name" class="col-xs-3 control-label">Currency <span class="required">*</span></label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.DropDownListFor(model => model.CURRENCY, ViewData["GetCurrency"] as SelectList, "Select Currency", new { @id = "CURRENCY", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label" for="contactPerson">Basic Salary Range <span class="required">*</span> </label>
                                    <div class="col-md-3 col-sm-3">
                                        @Html.TextBoxFor(model => model.SALARY_FROM, new { @id = "SALARY_FROM", @class = "form-control", @placeholder = "From", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                    <div class="col-md-3 col-sm-3">
                                        @Html.TextBoxFor(model => model.SALARY_TO, new { @id = "SALARY_TO", @class = "form-control", @placeholder = "To", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>

                                @{
                            List<SelectListItem> listAllowances = new List<SelectListItem>();
                            listAllowances.Add(new SelectListItem
                            {
                                Text = "Included",
                                Value = "Included"
                            });
                            listAllowances.Add(new SelectListItem
                            {
                                Text = "Allowance",
                                Value = "Allowance"
                            });
                            listAllowances.Add(new SelectListItem
                            {
                                Text = "Not Applicable",
                                Value = "NotApplicable"
                            });
                                }
                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Housing </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.DropDownListFor(model => model.HOUSING, listAllowances, "--Select Housing Allowance--", new { @id = "HOUSING", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>
                                <!-- The option field template containing an option field and a Remove button -->
                                <div class="form-group hide" id="housingOptionTemplate">
                                    <div class="col-xs-offset-3 col-xs-5">
                                        @Html.TextBoxFor(model => model.HOUSING_ALLOWANCE, new { @id = "HOUSING_ALLOWANCE", @class = "form-control", @placeholder = "Housing Allowance", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Food </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.DropDownListFor(model => model.FOOD, listAllowances, "--Select Food Allowance--", new { @id = "FOOD", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>

                                <div class="form-group hide" id="foodOptionTemplate">
                                    <div class="col-xs-offset-3 col-xs-5">
                                        @Html.TextBoxFor(model => model.FOOD_ALLOWANCE, new { @id = "FOOD_ALLOWANCE", @class = "form-control", @placeholder = "Food Allowance", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Traveling </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.DropDownListFor(model => model.TRAVELLING, listAllowances, "--Select Traveling Allowance--", new { @id = "TRAVELLING", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>

                                <div class="form-group hide" id="travelOptionTemplate">
                                    <div class="col-xs-offset-3 col-xs-5">
                                        @Html.TextBoxFor(model => model.TRAVELLING_ALLOWANCE, new { @id = "TRAVELLING_ALLOWANCE", @class = "form-control", @placeholder = "Traveling Allowance", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Medical </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.DropDownListFor(model => model.MEDICAL, listAllowances, "--Select Medical Allowance--", new { @id = "MEDICAL", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>

                                <div class="form-group hide" id="medicalOptionTemplate">
                                    <div class="col-xs-offset-3 col-xs-5">
                                        @Html.TextBoxFor(model => model.MEDICAL_ALLOWANCE, new { @id = "MEDICAL_ALLOWANCE", @class = "form-control", @placeholder = "Medical Allowance", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Overtime </label>
                                    <div class="col-md-6 col-sm-6">
                                        <input type="text" id="overTime" name="overTime" class="form-control col-md-2 col-xs-12">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label">Trip Per Year </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.TextBoxFor(model => model.TRIP_PER_YEAR, new { @id = "TRIP_PER_YEAR", @class = "form-control", @placeholder = "Trip Per Year", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label" for="ContractPeriod">Contract Period</label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.TextBoxFor(model => model.CONTRACT_PERIOD, new { @id = "CONTRACT_PERIOD", @class = "form-control", @placeholder = "Contract Period", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label" for="workingHours">Working Hours </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.TextBoxFor(model => model.WORKING_HOURS, new { @id = "WORKING_HOURS", @class = "form-control", @placeholder = "Working Hours", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label" for="contactPerson">Leaves </label>
                                    <div class="col-md-6 col-sm-6">
                                        @Html.TextBoxFor(model => model.LEAVES, new { @id = "LEAVES", @class = "form-control", @placeholder = "Leaves", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label col-xs-12">Remark </label>
                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                        @Html.TextAreaFor(model => model.REMARK, new { @id = "REMARK", @class = "form-control", @placeholder = "Remark", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                    <button type="submit" class="btn btn-primary">Cancel</button>
                                    <button type="submit" class="btn btn-success">Submit</button>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
}